package com.feinno.urcs.group.log;

import com.feinno.superpojo.type.EnumInteger;

/**
 * Created by wuhao on 15-10-14.
 */
public enum MessageDirection implements EnumInteger {

    UNKNOWN(0), UP(1), UPCC(2), DOWN(3), DOWNSMS(4), SERVICESMS(5), PUSH(6);

    int value;

    private MessageDirection(int value) {
        this.value = value;
    }

    public int intValue() {
        return value;
    }
    public static MessageDirection parse(int value) {
        switch (value) {
            case 0:
                return UNKNOWN;
            case 1:
                return UP;
            case 2:
                return UPCC;
            case 3:
                return DOWN;
            case 4:
                return DOWNSMS;
            case 5:
                return SERVICESMS;
            case 6:
                return PUSH;
            default:
                return null;
        }
    }
}
